<?php

class MGopY extends CI_Model
{
	function danhsachgy()
	{		
		return $this->db->get('gopy')->result();
	}
		
	function xoagy($magy)
	{
		$this->db->where('magy', $magy);
		$this->db->delete('gopy');
	}
		
	function thongtingy($magy)
	{
		$this->db->where('magy', $magy);
		return $this->db->get('gopy')->row();
	}
	
	function searchspUser($search)
	{
		$this->db->like('tensp', $search);
		$this->db->where('hienthi', 'true');
		return $this->db->get('sanpham')->result();
	}
	
}

?>